Clarify client behavior for 502 and 504 response codes #623
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The spec previously said that the client should retry if 502 or 504 response is received. However, it was not specified what retry strategy should be used if Retry-After header is missing.
The spec now says that the behavior when Retry-After is missing is the same for all 4 expected codes: 429,502,503,504.
This is not a breaking change. I consider it a bug in the spec. 949095b introduced codes 502 and 504 but forgot to describe their behavior in the throttling section. The change fixes the bug.
The other perspective is that this defines a previously unspecified behavior and does it in a SHOULD clause, so any existing client implementations that do not match the newly specified behavior are still legal (because it is a SHOULD clase and not a MUST clause). This is also an acceptable change to the spec (not breaking).